From: Aquila Macedo Date: Mon, 16 Mar 2026 04:09:29 +0000 (-0300) Subject: MDEV-39082 mysql-test: use vardir as datadir in collect_mysqld_features X-Git-Tag: archive/raspbian/1%11.8.6-4+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/%22stanciumarius94%40gmail.com//%22mailto:i18n-csb%40linuxcsb.org/%22/%22http:/www.example.com/%22stanciumarius94%40gmail.com/%22mailto:i18n-csb%40linuxcsb.org/%22?a=commitdiff_plain;h=67683a496440bbc90d2ca7f66181da975f28ca16;p=mariadb.git MDEV-39082 mysql-test: use vardir as datadir in collect_mysqld_features collect_mysqld_features probes mariadbd with --datadir=., which can point to the installed mysql-test tree. During this probe, mariadbd may run the datadir case-sensitivity check and try to create a *.lower-test file there. This is a bad fit when the test suite is run from a read-only installed path (e.g. /usr/share/...). Use $opt_vardir as the datadir for this probe instead, so it runs in a writable location and avoids writes into the installed test tree. This upstream change stemmed from discovering during AppArmor testing that the mariadb-test-run is writing in the /usr/share/.. path: apparmor="DENIED" operation="mknod" ... name="/usr/share/mariadb/mariadb-test/mariadb-aa.lower-test" requested_mask="c" Origin: https://github.com/MariaDB/server/commit/1ecc1d932a0d89d83c7487da6b34717f10a9b7f5.patch Forwarded: https://github.com/MariaDB/server/pull/4813 Gbp-Pq: Name MDEV-39082-mysql-test-use-vardir-as-datadir-in-collect_my.patch --- diff --git a/mysql-test/mariadb-test-run.pl b/mysql-test/mariadb-test-run.pl index 8d88e4d24..8453ce3ac 100755 --- a/mysql-test/mariadb-test-run.pl +++ b/mysql-test/mariadb-test-run.pl @@ -1798,7 +1798,7 @@ sub collect_mysqld_features { my $args; mtr_init_args(\$args); mtr_add_arg($args, "--no-defaults"); - mtr_add_arg($args, "--datadir=."); + mtr_add_arg($args, "--datadir=%s", $opt_vardir); mtr_add_arg($args, "--basedir=%s", $basedir); mtr_add_arg($args, "--lc-messages-dir=%s", $path_language); mtr_add_arg($args, "--skip-grant-tables");